<?php

namespace haibao\cms\data\starpk;


class StarPkProperty extends \haibao\cms\data\BaseMysql{

    public function __construct(){
        parent::__construct('\haibao\cms\model\data\starpk\StarPkProperty');
    }
    
    public function updateCommentNum($starPkId,$num = 1,$isSub=false){
        if ($isSub){
            $sql = 'update StarPkProperty set CommentNum=CommentNum-'.$num.' where StarPkId=%s';
        }else {
            $sql = 'update StarPkProperty set CommentNum=CommentNum+'.$num.' where StarPkId=%s';
        }
    	$this->query($sql,array($starPkId));
    }
}